/* Copyright - Apache License 2.0
 * 
 * The project "kyou" is
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *      http://www.apache.org/licenses/LICENSE-2.0
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package net.kyou.pack.segment.param;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 标记在Param的实现类上，为Param的实现类提供一些静态信息。
 * 
 * @author NuclearG (<a href="mailto:nuclearg@163.com">nuclearg@163.com</a>)
 */
@Target({ ElementType.TYPE })
@Retention(RetentionPolicy.RUNTIME)
@interface ParamTag {
    /**
     * 参数的主体
     */
    String name();

    /**
     * 参数需要的后缀类型
     */
    ParamPostfix postfix();

    /**
     * 参数的返回值类型
     */
    ParamType type();

    /**
     * 二元参数接收的参数类型
     * <p>
     * 对于一元参数来说该值应当为Irrelevant
     * </p>
     */
    ParamType require() default ParamType.Irrelevant;
}
